<template>
  <view class="my-container">
    <my-login v-if="!token"></my-login>
    <my-userinfo v-else></my-userinfo>
  </view>
</template>

<script setup>
import { onShow } from '@dcloudio/uni-app';  
import { useTabBarBadge } from '@/hooks/tabbar-badge.js'; 
import { useUser } from '../../store';
import {storeToRefs} from 'pinia'
const { onPageShow } = useTabBarBadge();  
// onShow(onPageShow); // 在页面显示时调用 onPageShow  
onShow(()=>{
  onPageShow()
})
const userStore = useUser()
const {token} = storeToRefs(userStore)
</script>

<style lang="scss">
page,.my-container {
  height: 100%;
}
</style>
